<%- include('header.html') -%>

    <div class="container mt-5 con_list">
        <h2 class="mb-4">当前栏目：<%=category.name%>
        </h2>
        <div class="row row-cols-4">
            <% articles.forEach(article=> { %>
                <div class="col-12 col-sm-6 col-lg-3 my-3">
                    <div class="card h-100">
                        <img src="<%= article.thumbnail %>" data-src="holder.js/100px150" class="card-img-top"
                            alt="...">
                        <div class="card-body">
                            <h5 class="card-title">
                                <%= article.title %>
                            </h5>
                            <p class="card-text"><small class="text-muted">
                                    <%= article.time.toLocaleString() %>
                                </small></p>
                            <p class="card-text">
                                <%= article.content.replace(/<[^>]+>/g,'').substring(0,100) %>...
                            </p>
                            <a href="/article/<%=article.id%>" class="stretched-link"></a>
                        </div>
                    </div>
                </div>
                <% }) %>

        </div>
    </div>


    <%- include('footer.html') -%>